package com.hanlyjiang.library.widget.paint;

import android.graphics.Canvas;
import android.graphics.Paint;

/**
 * 文字shape
 * @author Hanly
 *
 */
public class DTextShape extends DShape {

	private String text;
	private float x;
	private float y;
	private float textSize;
	
	public DTextShape(String text, float x, float y,int color,float textSize) {
		super(color);
		this.text = text;
		this.x = x;
		this.y = y;
		this.textSize = textSize;
	}

	@Override
	public void draw(Canvas c, Paint paint) {
		super.draw(c, paint);
		paint.setTextSize(textSize);
		c.drawText(text, x, y, paint);
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public float getX() {
		return x;
	}

	public void setX(float x) {
		this.x = x;
	}

	public float getY() {
		return y;
	}

	public void setY(float y) {
		this.y = y;
	}

}
